package com.dyj.applet.handler;

import com.dtflys.forest.annotation.JSONBody;
import com.dtflys.forest.annotation.Post;
import com.dyj.applet.domain.QueryAndCalculateMarketingResult;
import com.dyj.applet.domain.QueryCertificatesOrderInfo;
import com.dyj.applet.domain.QueryIndustryItemOrderInfo;
import com.dyj.applet.domain.query.*;
import com.dyj.applet.domain.vo.*;
import com.dyj.common.config.AgentConfiguration;
import com.dyj.common.domain.DataAndExtraVo;
import com.dyj.common.domain.DySimpleResult;
import com.dyj.common.domain.vo.BaseVo;
import com.dyj.common.interceptor.ClientTokenInterceptor;

import java.util.List;

/**
 * 交易系统 生活服务交易系统
 */
public class IndustryTransactionHandler extends AbstractAppletHandler{
    public IndustryTransactionHandler(AgentConfiguration agentConfiguration) {
        super(agentConfiguration);
    }


    /**
     * 查询订单基本信息。
     * @param body 查询订单基本信息。请求值
     * @return
     */
    public DataAndExtraVo<QueryIndustryOrderVo> queryIndustryOrder(QueryIndustryOrderQuery body){
        baseQuery(body);
        return getIndustryOpenTransactionClient().queryIndustryOrder(body);
    }

    /**
     * 查询券状态信息
     * @param body 查询券状态信息请求值
     * @return
     */
    public DataAndExtraVo<QueryIndustryItemOrderInfoVo> queryIndustryItemOrderInfo(QueryIndustryItemOrderInfoQuery body){
        baseQuery(body);
        return getIndustryOpenTransactionClient().queryIndustryItemOrderInfo(body);
    }

    /**
     * 生活服务交易系统->查询 CPS 信息
     * @param body 查询 CPS 信息请求值
     * @return
     */
    public DataAndExtraVo<QueryIndustryCpsVo> queryIndustryOrderCps(QueryIndustryOrderCpsQuery body){
        baseQuery(body);
        return getIndustryOpenTransactionClient().queryIndustryOrderCps(body);
    }


    /**
     * 生活服务交易系统->预下单->开发者发起下单
     * @param body
     * @return
     */
    public DySimpleResult<PreCreateIndustryOrderVo> preCreateIndustryOrder(PreCreateIndustryOrderQuery body){
        baseQuery(body);
        return getIndustryOpenTransactionClient().preCreateIndustryOrder(body);
    }

    /**
     * 生活服务交易系统->营销算价->查询营销算价
     * @param body
     */
    public DySimpleResult<QueryAndCalculateMarketingResult> queryAndCalculateMarketing(QueryAndCalculateMarketingQuery body){
        baseQuery(body);
        return getIndustryOpenTransactionClient().queryAndCalculateMarketing(body);
    }

    /**
     * 生活服务交易系统->核销->抖音码->验券准备
     * @param body 验券准备请求值
     * @return
     */
    public DataAndExtraVo<DeliveryPrepareVo> deliveryPrepare(DeliveryPrepareQuery body) {
        baseQuery(body);
        return getIndustryOpenTransactionClient().deliveryPrepare(body);
    }

    /**
     * 生活服务交易系统->核销->抖音码->验券
     * @param body 验券请求值
     * @return
     */
    public DataAndExtraVo<DeliveryVerifyVo> deliveryVerify(DeliveryVerifyQuery body){
        baseQuery(body);
        return getIndustryOpenTransactionClient().deliveryVerify(body);
    }

    /**
     * 生活服务交易系统->核销->抖音码->撤销核销
     * 生活服务交易系统->核销->三方码->撤销核销
     * @param body 撤销核销请求值
     * @return
     */
    public DataAndExtraVo<BaseVo> verifyCancel(VerifyCancelQuery body){
        baseQuery(body);
        return getIndustryOpenTransactionClient().verifyCancel(body);
    }

    /**
     * 生活服务交易系统->核销->三方码->推送核销状态
     * @param body 推送核销状态请求值
     * @return
     */
    public DataAndExtraVo<PushDeliveryVo> pushDelivery(PushDeliveryQuery body){
        baseQuery(body);
        return getIndustryOpenTransactionClient().pushDelivery(body);
    }

    /**
     * 生活服务交易系统->分账->查询分账
     * @param body 查询分账请求值
     * @return
     */
    public DataAndExtraVo<List<IndustryQuerySettleVo>> industryQuerySettle(IndustryQuerySettleQuery body){
        baseQuery(body);
        return getIndustryOpenTransactionClient().industryQuerySettle(body);
    }

    /**
     * 生活服务交易系统->退货退款->开发者发起退款
     * @param body
     * @return
     */
    public DataAndExtraVo<DeveloperCreateRefundVo> developerCreateRefund(DeveloperCreateRefundQuery body){
        baseQuery(body);
        return getIndustryOpenTransactionClient().developerCreateRefund(body);
    }

    /**
     * 生活服务交易系统->退货退款->同步退款审核结果
     * @param body 同步退款审核结果请求值
     * @return
     */
    public DataAndExtraVo<BaseVo> refundMerchantAuditCallback(RefundMerchantAuditCallbackQuery body){
        baseQuery(body);
        return getIndustryOpenTransactionClient().refundMerchantAuditCallback(body);
    }

    /**
     * 生活服务交易系统->退货退款->查询退款
     * @param body
     * @return
     */
    public DataAndExtraVo<IndustryQueryRefundVo> industryQueryRefund(QueryRefundQuery body){
        baseQuery(body);
        return getIndustryOpenTransactionClient().industryQueryRefund(body);
    }

    /**
     * 生活服务交易系统->预约->创建预约单
     * @param body
     * @return
     */
    public DataAndExtraVo<CreateBookVo> createBook(CreateBookQuery body){
        baseQuery(body);
        return getIndustryOpenTransactionClient().createBook(body);
    }

    /**
     * 生活服务交易系统->预约->预约接单结果回调
     * @param body
     */
    public DataAndExtraVo<Void> bookResultCallback(BookResultCallbackQuery body){
        baseQuery(body);
        return getIndustryOpenTransactionClient().bookResultCallback(body);
    }


    /**
     * 生活服务交易系统->预约->商家取消预约
     * @param body
     */
    public DataAndExtraVo<Void> merchantCancelBook(MerchantCancelBookQuery body){
        baseQuery(body);
        return getIndustryOpenTransactionClient().merchantCancelBook(body);
    }


    /**
     * 生活服务交易系统->预约->用户取消预约
     * @param body
     */
    public DataAndExtraVo<Void> userCancelBook(UserCancelBookQuery body){
        baseQuery(body);
        return getIndustryOpenTransactionClient().userCancelBook(body);
    }

    /**
     * 生活服务交易系统->预约->查询预约单信息
     */
    public DataAndExtraVo<List<QueryBookVo>> queryBook(QueryBookQuery body){
        baseQuery(body);
        return getIndustryOpenTransactionClient().queryBook(body);
    }

    /**
     * 生活服务交易系统->预下单->关闭订单
     * @return
     */
    public DataAndExtraVo<Void> closeOrder(CloseOrderQuery body) {
        baseQuery(body);
        return getIndustryOpenTransactionClient().closeOrder(body);
    }

    /**
     * 生活服务交易系统->核销->核销工具->查询用户券列表
     * @param body
     */
    public DataAndExtraVo<QueryUserCertificatesVo> queryUserCertificates(QueryUserCertificatesQuery body){
        baseQuery(body);
        return getIndustryOpenTransactionClient().queryUserCertificates(body);
    }


    /**
     * 生活服务交易系统->核销->核销工具->查询订单可用门店
     * @param body
     */
    public DataAndExtraVo<QueryCertificatesOrderInfo> orderCanUse(OrderCanUseQuery body) {
        baseQuery(body);
        return getIndustryOpenTransactionClient().orderCanUse(body);
    }

    /**
     * 生活服务交易系统->核销->核销工具->设置商家展示信息
     * @param body
     */
    public DySimpleResult<Void> updateMerchantConf(UpdateMerchantConfQuery body) {
        baseQuery(body);
        return getIndustryOpenTransactionClient().updateMerchantConf(body);
    }

    /**
     * 生活服务交易系统->核销->核销工具->查询商家配置文案
     * @param body
     */
    public DySimpleResult<TradeToolkitQueryTextVo> tradeToolkitQueryText(TradeToolkitQueryTextQuery body) {
        baseQuery(body);
        return getIndustryOpenTransactionClient().tradeToolkitQueryText(body);
    }

    /**
     * 生活服务交易系统->核销->核销工具->设置订单详情页按钮白名单接口
     * @param body
     */
    public DySimpleResult<Void> buttonWhiteSetting(ButtonWhiteSettingQuery body){
        baseQuery(body);
        return getIndustryOpenTransactionClient().buttonWhiteSetting(body);
    }

    /**
     * 生活服务交易系统->核销->核销工具->设置小程序跳转path
     * @param body
     */
    public DySimpleResult<Void> updateMerchantPath(UpdateMerchantPathQuery body) {
        baseQuery(body);
        return getIndustryOpenTransactionClient().updateMerchantPath(body);
    }

    /**
     * 生活服务交易系统->分账->发起分账
     * @param body 发起分账请求值
     * @return
     */
    public DataAndExtraVo<CreateSettleV2Vo> createSettleV2(CreateSettleV2Query body) {
        baseQuery(body);
        return getIndustryOpenTransactionClient().createSettleV2(body);
    }

    /**
     * 行业交易系统->预下单->查询 CPS 信息
     * @param body 查询 CPS 信息请求值
     * @return
     */
    public DySimpleResult<QueryIndustryCpsVo> queryTradeCps(QueryIndustryOrderCpsQuery body) {
        baseQuery(body);
        return getIndustryOpenTransactionClient().queryTradeCps(body);
    }

    /**
     * 行业交易系统->预下单->查询订单信息
     * @param body 查询订单信息请求值
     * @return
     */
    public DySimpleResult<QueryTradeOrderVo> queryTradeOrder(QueryTradeOrderQuery body) {
        baseQuery(body);
        return getIndustryOpenTransactionClient().queryTradeOrder(body);
    }


    /**
     * 行业交易系统->预下单->开发者发起下单
     * @param body 开发者发起下单
     * @return
     */
    public DySimpleResult<PreCreateIndustryOrderVo> createTradeOrder(CreateTradeOrderQuery body) {
        baseQuery(body);
        return getIndustryOpenTransactionClient().createTradeOrder(body);
    }

    /**
     * 行业交易系统->核销->抖音码->验券准备
     * @param body 验券准备请求值
     * @return
     */
    public DySimpleResult<TradeDeliveryPrepareVo> tradeDeliveryPrepare(DeliveryPrepareQuery body) {
        baseQuery(body);
        return getIndustryOpenTransactionClient().tradeDeliveryPrepare(body);
    }

    /**
     * 行业交易系统->核销->抖音码->验券
     * @param body 验券准备请求值
     * @return
     */
    public DySimpleResult<TradeDeliveryVerifyVo> tradeDeliveryVerify(DeliveryVerifyQuery body) {
        baseQuery(body);
        return getIndustryOpenTransactionClient().tradeDeliveryVerify(body);
    }

    /**
     * 行业交易系统->核销->抖音码->查询劵状态信息
     * @param body 查询劵状态信息请求值
     * @return
     */
    public DySimpleResult<List<QueryIndustryItemOrderInfo>> queryItemOrderInfo(QueryIndustryItemOrderInfoQuery body) {
        baseQuery(body);
        return getIndustryOpenTransactionClient().queryItemOrderInfo(body);
    }

    /**
     * 行业交易系统->核销->三方码->推送核销状态
     * @param body 推送核销状态
     * @return
     */
    public DySimpleResult<TradePushDeliveryVo> tradePushDelivery(TradePushDeliveryQuery body){
        baseQuery(body);
        return getIndustryOpenTransactionClient().tradePushDelivery(body);
    }

    /**
     * 行业交易系统->分账->发起分账
     * @param body 发起分账
     * @return
     */
    public DySimpleResult<CreateSettleV2Vo> tradeCreateSettle(CreateSettleV2Query body) {
        baseQuery(body);
        return getIndustryOpenTransactionClient().tradeCreateSettle(body);
    }

    /**
     * 行业交易系统->分账->查询分账
     * @param body 查询分账
     * @return
     */
    public DySimpleResult<TradeQuerySettleVo> tradeQuerySettle(TradeQuerySettleQuery body) {
        baseQuery(body);
        return getIndustryOpenTransactionClient().tradeQuerySettle(body);
    }
}
